#ifndef SINGLETON_H_
#define SINGLETON_H_
#include <iostream>
class Singleton {
 public:
    static Singleton& GetInstance() {
        static Singleton instance;
        return instance;
    }
    Singleton(const Singleton&) = delete;
    Singleton& operator=(const Singleton&) = delete;
    void print() {
        std::cout << "Hello from MyClass!" << this << std::endl;
    }

 private:
    Singleton() {}
};

int main() {
    Singleton& instance_1 = Singleton::GetInstance();
    instance_1.print() ;
    // << std::endl;
    // std::cout << "s2地址: " <<  s2 << std::endl;
    return 0;
}
#endif  // SINGLETON_H_